using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Windows.Forms;

namespace Model
{
    public class Instituicoes
    {

        public static void Grava(String strNome, String strCNPJ )
        {
            String strQuery = "insert into Instituicoes(descInstituicao,descCNPJ) values ('"+strNome +"' , '" + strCNPJ + "' ) ";
            SqlHelper.ExecuteNonQuery(strQuery);
        }

        public static void BindaCombo(ComboBox cbxBind)
        {
            String strQuery       = "select * from Instituicoes";
            cbxBind.DataSource    = SqlHelper.ExecuteDataTable(strQuery);
            cbxBind.DisplayMember = "descInstituicao";
            cbxBind.ValueMember   = "codInstituicao";
        }
    }
}
